﻿#region Header
// ------------------------ Licence / Copyright ------------------------
// 
// ScrumTable for Scrum Meeting Support
// Copyright © HSR - Hochschule für Technik Rapperswil
// All Rights Reserved
// 
// Author:
//  Michael Gfeller Silvan Gehrig Patrick Boos
// 
// ---------------------------------------------------------------------
#endregion

#region Usings

using System;

#endregion

namespace ScrumTable.DL.Data.TFS.Services.SharePoint
{
    /// <summary>
    /// This class is used to wrap an iteration entry in the IterationList.
    /// </summary>
    public class WssIteration
    {
        #region Declarations
        //--------------------------------------------------------------------
        // Declarations
        //--------------------------------------------------------------------

        #endregion

        #region Properties
        //--------------------------------------------------------------------
        // Properties
        //--------------------------------------------------------------------

        /// <summary>
        /// Gets the MDX id of the current iteration.
        /// </summary>
        public string TfsMdxId { get; private set; }
        
        /// <summary>
        /// Gets the start date of the iteration.
        /// </summary>
        public DateTime StartDate { get; set; }

        /// <summary>
        /// Gets the end date of the iteration.
        /// </summary>
        public DateTime EndDate { get; set; }

        internal int TfsId { get; private set; }
        internal string WssId { get; set; }
        internal string IterationName { get; set; }

        #endregion

        #region Constructors / Destructor
        //--------------------------------------------------------------------
        // Constructors / Destructor
        //--------------------------------------------------------------------

        /// <summary>
        /// Creates a new WssIterationList instance. This constructor is used in
        /// the current library only.
        /// </summary>
        internal WssIteration(int tfsId, string iterationName)
        {
            StartDate = DateTime.Now;
            EndDate = DateTime.Now;
            TfsMdxId = string.Empty;
            TfsId = tfsId;
            IterationName = iterationName;
        }

        /// <summary>
        /// Creates a new WssIterationList instance. This constructor is used in
        /// the current library only.
        /// </summary>
        internal WssIteration(string iterationName, string wssId, int tfsId, string tfsMdxId, DateTime startDate, DateTime endDate)
        {
            WssId = wssId;
            TfsId = tfsId;
            TfsMdxId = tfsMdxId;
            StartDate = startDate;
            EndDate = endDate;
            IterationName = iterationName;
        }

        #endregion

        #region Methods
        //--------------------------------------------------------------------
        // Methods
        //--------------------------------------------------------------------

        #endregion

        #region Events
        //--------------------------------------------------------------------
        // Events
        //--------------------------------------------------------------------

        #endregion
    }
}
